from django import forms
from .models import Idc, Host


class IdcForm(forms.ModelForm):
    #添加机房表单
    class Meta:
        model = Idc
        fields = ['name','remark']
        labels = {'name': '名称','remark': '备注'}


class HostForm(forms.ModelForm):
    #添加主机列表
    class Meta:
        model = Host
        fields = ['hostname','number','application']
        labels = {'hostname': '主机名称','number': '编号','application': '应用'}